<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <a href="#bar">点击</a>
    <h1>
        bar
    </h1>


    <script>
        window.onload = function () {
            console.log("加载");
        }

        window.onhashchange = function () {
            console.log("hash");
        }

        window.onwheel = function () {
            console.log("onwheel");
        }

        window.onpopstate = function (e) {
            alert("onpopstate");
        }

        let stateObj = {
            foo: "foo",
        };

        // history.pushState(stateObj,"dsc",'foo.html');
        // window.defaultStatus


        let obj = {
            name: "dxk",
            age: "18"
        }

        // 对象扩展运算法,得到也就是一个对象,对象的合并
        const o = {
            ...{
                stu: "ddd"
            },
            ...obj
        }
        const {
            name,
            age
        } = {
            ...obj
        }


        // 数组的扩展运算符,扩展对象,结构,合并
        const arr = [10, 20, 30]

        const c = [...arr, ...[10, 3044]]

        console.log(o);
    </script>
</body>

</html>